﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Shapes;
using Telerik.Windows.Controls;
using Broker.Model;

namespace Broker
{
    /// <summary>
    /// Interaction logic for RegPromptForm.xaml
    /// </summary>
    public partial class RegPromptForm
    {



        public RegPromptForm(ContentControl Owner)
        {
            InitializeComponent();
            this.Owner = Owner;
            
        }

        private void btnReg_Click(object sender, RoutedEventArgs e)
        {
            LicenseInfo licInfo = LicenseInfo.GetInstance();

            RegisterForm frm = new RegisterForm( licInfo,this.Owner);

            frm.CallBack = (bool isSuccess) =>
                {
                    this.Close();//注册成功就关闭当前窗口
                };

            frm.WindowStartupLocation = WindowStartupLocation.CenterOwner;
            frm.ShowDialog();
        }

        private void btnExit_Click(object sender, RoutedEventArgs e)
        {
            Close();
        }


    }
}
